Queries with Guarded Negation (full version)
نویسندگان
چکیده
A well-established and fundamental insight in database the-ory is that negation (also known as complementation) tendsto make queries difficult to process and difficult to reasonabout. Many basic problems are decidable and admit prac-tical algorithms in the case of unions of conjunctive queries,but become difficult or even undecidable when queries areallowed to contain negation. Inspired by recent results in fi-nite model theory, we consider a restricted form of negation,guarded negation. We introduce a fragment of SQL, calledGN-SQL, as well as a fragment of Datalog with stratifiednegation, called GN-Datalog, that allow only guarded nega-tion, and we show that these query languages are compu-tationally well behaved, in terms of testing query contain-ment, query evaluation, open-world query answering, andboundedness. GN-SQL and GN-Datalog subsume a num-ber of well known query languages and constraint languages,such as unions of conjunctive queries, monadic Datalog, andfrontier-guarded tgds. In addition, an analysis of standardbenchmark workloads shows that most usage of negation inSQL in practice is guarded negation.
منابع مشابه
Queries with Guarded Negation
A well-established and fundamental insight in database theory is that negation (also known as complementation) tends to make queries difficult to process and difficult to reason about. Many basic problems are decidable and admit practical algorithms in the case of unions of conjunctive queries, but become difficult or even undecidable when queries are allowed to contain negation. Inspired by re...
متن کاملCombined Tractability of Query Evaluation via Tree Automata and Cycluits (Extended Version)
We investigate parameterizations of both database instances and queries that make query evaluation fixed-parameter tractable in combined complexity. We introduce a new Datalog fragment with stratified negation, intensional-clique-guarded Datalog (ICG-Datalog), with linear-time evaluation on structures of bounded treewidth for programs of bounded rule size. Such programs capture in particular co...
متن کاملRewriting Guarded Negation Queries
The Guarded Negation Fragment (GNFO) is a fragment of first-order logic that contains all unions of conjunctive queries, a restricted form of negation that suffices for expressing some common uses of negation in SQL queries, and a large class of integrity constraints. At the same time, as was recently shown, the syntax of GNFO is restrictive enough so that static analysis problems such as query...
متن کاملCombined Tractability of Query Evaluation via Tree Automata and Cycluits
We investigate parameterizations of both database instances and queries that make query evaluation fixed-parameter tractable in combined complexity. We introduce a new Datalog fragment with stratified negation, intensional-clique-guarded Datalog (ICG-Datalog), with linear-time evaluation on structures of bounded treewidth for programs of bounded rule size. Such programs capture in particular co...
متن کاملA Guarded negation
We consider restrictions of first-order logic and of fixpoint logic in which all occurrences of negation are required to be guarded by an atomic predicate. In terms of expressive power, the logics in question, called GNFO and GNFP, extend the guarded fragment of first-order logic and the guarded least fixpoint logic, respectively. They also extend the recently introduced unary negation fragment...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1203.0077 شماره
صفحات -
تاریخ انتشار 2012